i18n.setLanguage(window.navigator.userLanguage || window.navigator.language)
Blog.config({
  basePath: '/',
  title: "灿飞和无为的博客",
  blogIndexTemplate: 'blog',
  blogShowTemplate: 'show',
  comments: {
    useSideComments: true,
    defaultImg: '/default-user.png'
  },
  language: {
    blogEmpty: '暂无内容',
    backToBlogIndex: '首页',
    loadMore: '更多',
    tags: 'Tags',
    slug: 'Slug',
    metaDescription: 'Meta Description',
    body: '正文',
    showAsVisual: '视图',
    showAsHtml: 'HTML',
    save: '保存',
    cancel: '取消',
    "delete": '删除',
    metaAuthorBy: 'By',
    metaAuthorOn: 'on',
    edit: '编辑',
    areYouSure: 'Are you sure?',
    disqusPoweredBy: 'comments powered by',
    adminHeader: 'Blog Admin',
    addPost: 'Add Blog Post',
    allPosts: 'All Posts',
    myPosts: 'My Posts',
    addPost: 'Add Post',
    editPost: 'Edit Post',
    title: '标题',
    author: '发布者',
    updatedAt: '更新于',
    publishedAt: '发布于',
    visibleTo: 'Visible To',
    featuredImage: '图片',
    selectFile: '文件',
    imageAsBackground: '背景图',
    enterTag: 'Type in a tag & hit enter',
    postCreateFirst: 'Create the first blog',
    postVisibilityAdmins: 'Me & Admins only',
    postVisibilityLink: 'Anyone with link',
    postVisibilityAnyone: 'The world',
    saved: 'Saved',
    editFeaturedImageSaved: 'Featured image saved',
    editErrorSlugExists: 'Blog with this slug already exists',
    editErrorBodyRequired: 'Blog body is required'
  }
});
